package com.ncloud.billing.mapper;

import java.util.List;

import org.apache.ibatis.annotations.*;

import com.ncloud.billing.entity.BsNodeItem;
@Mapper
public interface BsNodeItemMapper {
	@Select(value = { "select attr_id, node_id, attr_type, attr_code, attr_value, begin_date, end_date from bs_node_item where node_id = #{nodeId} and now() between begin_date and end_date " })
		@Results({ @Result(column = "attr_id", property = "attrId"), @Result(column = "node_id", property = "nodeId"),
		@Result(column = "attr_type", property = "attrType"),@Result(column = "attr_code", property = "attrCode"),
		@Result(column="attr_value",property="attrValue"),@Result(column="begin_date",property="beginDate"),
		@Result(column="end_date",property="endDate")})
	List<BsNodeItem> getNodeItemByNodeID(Long nodeId);

}
